﻿@model Zatify.WebUI.Models.UserProfilePromotionDetailsViewModel
@{
    ViewBag.Title = "Promotion";
    Layout = "~/Views/Shared/_MainLayout.cshtml";
}
<div class="inner_container">
    <h2>
        @Model.Promotion.Business.BusinessName
        <p class="sub_title_hd">@Model.Promotion.Business.StreetAddress1 <span class="distance">
            1.1mi</span></p>
    </h2>
    <div class="details_banner" style="text-align: center;">
        <img alt="" src="@Url.Action("GetPromotionPhoto", "UserProfile", new { promotionId = Model.Promotion.PromotionId, w = 940, h = 350 })" />
    </div>
    <div class="rating_desc">
        @InlineHelpers.FiveStarsRatingReadonly(Model.Promotion.Business.Rating)<span class="rating_text">
                    @Model.Promotion.Business.ReviewsCount Reviews</span>
        <span style="padding-left: 20px;" class="sub_title_hd">@Model.Promotion.PromotionText</span>
    </div>
    <div class="z_deal_business_details_content">
        <div class="z_details_left">
            <div class="rating_price">
                <div class="z_deal_price_bg">
                    <span class="z_deal_price">$$$</span>
                </div>
            </div>
            <div class="items_category">
                @if (Model.Promotion.Categories != null && Model.Promotion.Categories.Count() > 0)
                {
                    @InlineHelpers.BusinessCategories(Model.Promotion.Categories)
                }
                else
                {
                    <text>&nbsp;</text> 
                }</div>
            <div class="items_category_business_hr">
                    @if (@Model.Promotion.Business.StatusToday == "OPEN")
                    { 
                        <text> Hours Today: @Model.Promotion.Business.HoursToday
                        <span class="business_hr_open">Open</span>
                        </text> 
                    }
                    else
                    {
                        <text><span class="business_hr_open" style="color: Red; padding-left: 0;">Closed</span></text> 
                    }
            </div>
        </div>
        <div class="z_details_right">
            <div class="deal_details_contact_info">
                <ul class="deal_contact_info">
                    <li><a href="#" class="phone_call">Call <span class="phone_call_no">@Model.Promotion.Business.BusinessPhone</span>
                        <img align="right" alt="" src="@Url.Content("~/Content/zatify/images/contact_arrow.png")" /></a></li>
                    <li><a href="@Url.Action("BusinessDirection", "UserProfile", new { id = Model.Promotion.Business.BusinessId }, "http")" class="directions">
                            Directions<img align="right" alt="" src="@Url.Content("~/Content/zatify/images/contact_arrow.png")" /></a></li>
                    <li><a href="@Url.Action("BusinessMoreInfo", new { id = Model.Promotion.Business.BusinessId })" class="more_info">
                            More Info<br />
                            <span class="more_info_hr">Hours</span><img align="right" alt="" src="@Url.Content("~/Content/zatify/images/contact_arrow.png")" style="margin-top: -12px;" /></a></li>
                </ul>
            </div>
            <div class="deal_details_line">
                <a href="@Url.Action("CheckIn")" class="red_btn" style="visibility:hidden;">Check - In</a>
                @if (!Model.IsUserFavorite)
                {
                    <a href="@Url.Action("PromotionFavoritesAdd", new { businessId = Model.Promotion.Business.BusinessId, promotionId = Model.Promotion.PromotionId })" class="red_btn" style="float: right;">
                        Add to Favorites</a>
                }
                else
                {
                    <a href="@Url.Action("PromotionFavoritesDelete", new { businessId = Model.Promotion.Business.BusinessId, promotionId = Model.Promotion.PromotionId })" class="red_btn" style="float: right;">
                        Delete from Favorites</a>
                }
            </div>
            <div class="deal_details_line">
                @using (Html.BeginForm("Block", "UserProfile", FormMethod.Post, new { id = "blockForm" }))
                {
                    @Html.Hidden("promotionId",Model.Promotion.PromotionId)
                    @Html.Hidden("ids")

                    <a href="#" class="gold_btn" onclick="$('#blockForm').submit();">Block</a>
                    
                    <select id="blockType" name="blockType" class="promo_details_select" style="float: right;">
                        <option value="1">This Promotion</option>
                        <option value="2">This Business</option>
                        <option value="3">This Category</option>
                    </select>
                }
            </div>
        </div>
    </div>
    <div class="clearfix">
    </div>
</div>
